package pack1

import (
	"fmt"
	"regexp"
)

//import "archive/tar"

func RegexMatchString() {
	//tar.
	ok,_ := regexp.MatchString("a", "aaaa");
	if ok {
		fmt.Println("match value success")
	}

	searchInput := "John: 2578.34 William: 4567.23 Steve: 5632.18"
	pat := "[0-9]+.[0-9]+"
	r,err := regexp.Compile(pat)
	if err == nil {
		result := r.ReplaceAllString(searchInput, "##.##")
		fmt.Println("result", result)
	}
}
